import request from '@/utils/request'
const api_name = "activity"

/**分页查询活动列表 */
export function getActivityListByCondition(queryCondition) {
    return request({
        url: `/${api_name}/querypage`,
        method: 'post',
        data: queryCondition
    })
}

/**活动详情 */
export function getActivityDetail(id) {
    return request({
        url: `/${api_name}/${id}`,
        method: 'get'
    })
}

/**删除活动 */
export function removeActivity(id) {
    return request({
        url: `/${api_name}/remove/${id}`,
        method: 'DELETE'
    })
}

/**修改活动 */
export function editActivity(editinfo) {
    return request({
        url: `/${api_name}/edit`,
        method: 'PUT',
        data:editinfo
    })
}

/**添加活动 */
export function addActivity(addinfo) {
    return request({
        url: `/${api_name}/add`,
        method: 'POST',
        data:addinfo
    })
}

/**获取所有活动 */
export  function allActivity() {
    return request({
        url: `/${api_name}/getall`,
        method: 'GET'
    })
}